<?php

namespace pmvc\ioc\annotation;

use pmvc\annotation\AbstractAnnotation;

/**
 * TODO: document
 * 
 * @\pmvc\annotation\Params(names=[
 * 		"id", "name", "lazy", "singleton", "abstract",
 * 		"initMethod", "destroyMethod", "lazy", "singleton",
 * 		"parent", "preloadFile"
 *	])
 * @\pmvc\annotation\Locations(locations=[self::CLASSES])
 */
class Object
	extends AbstractAnnotation {

	/**
	 * {@inheritDoc}
	 */
	protected function validateAndTransformParameter($name, $value) {
		switch($name) {
			case "lazy":
				return $value===true;
			case "singleton":
				return $value===true;
			default:
				return $value;
		}
	}
}

?>